package com.atmilan.quartz.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.atmilan.quartz.mapper.StoreProductDescriptionMapper;
import com.atmilan.quartz.model.entity.crmeb.StoreProductDescription;
import com.atmilan.quartz.service.IStoreProductDescriptionService;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

/**
* @author Mr.Zhang
* @description StoreProductDescriptionServiceImpl 接口实现
* @date 2020-05-27
*/
@DS("crmeb")
@Service
public class StoreProductDescriptionServiceImpl extends ServiceImpl<StoreProductDescriptionMapper, StoreProductDescription> implements IStoreProductDescriptionService {
    @Autowired
    StoreProductDescriptionMapper storeProductDescriptionMapper;
    
    @Override
    public void deleteByProductId(int productId) {
        remove(Wrappers.<StoreProductDescription>lambdaUpdate().eq(StoreProductDescription::getProductId, productId));
    }

    @Override
    public void deleteAll() {
        storeProductDescriptionMapper.deleteAll();
    }
    
}
